﻿<Page x:Class="ConnectionPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Connection">
    <StackPanel Style="{StaticResource AppFont}">
        <TextBlock Style="{StaticResource PageTitle}">Connection</TextBlock>
        <FlowDocumentScrollViewer Style="{StaticResource FlowDocumentScrollViewerStyle}" MaxWidth="800">
            <FlowDocument>
                <BlockUIContainer>
                    <StackPanel>
                        <TextBlock Name="blkRedirectedMessage" TextWrapping="Wrap">
                            You have been redirected to this page because the page you requested requires a database connection.
                            Click <Hyperlink Name="lnkOptionsPage">here</Hyperlink> to disable this behavior.
                        </TextBlock>
                        <Label Name="lblConnectionStatus" Margin="0,0,0,10">Connection status goes here...</Label>

                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                                <RowDefinition/>
                                <RowDefinition/>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>

                            <Label Grid.Row="0" Grid.Column="0" Name="Label1">Server Name:</Label>
                            <Label Grid.Row="1" Grid.Column="0" Name="Label2">Database:</Label>
                            <Label Grid.Row="2" Grid.Column="0" Name="Label3">Authentication:</Label>
                            <Label Grid.Row="3" Grid.Column="0" Name="Label4">Login:</Label>
                            <Label Grid.Row="4" Grid.Column="0" Name="Label5">Password:</Label>

                            <TextBox Grid.Row="0" Grid.Column="1" Name="txtServerName" />
                            <TextBox Grid.Row="1" Grid.Column="1" Name="txtDatabase"/>
                            <WrapPanel Grid.Row="2" Grid.Column="1" Name="WrapPanel1">
                                <RadioButton Name="rdoAuthWindows" Margin="0,5,0,0">Windows</RadioButton>
                                <RadioButton Name="rdoAuthSqlServer" Margin="10,5,0,0">SQL Server</RadioButton>
                            </WrapPanel>
                            <TextBox Grid.Row="3" Grid.Column="1" Name="txtLogin"/>
                            <PasswordBox Grid.Row="4" Grid.Column="1" Name="txtPassword"/>

                            <WrapPanel Grid.Row="5" Grid.ColumnSpan="2">
                                <Button Name="btnConnectDisconnect" Margin="5">Connect</Button>
                                <Button Name="btnSave" Margin="5">Save</Button>
                                <Button Name="btnForget" Margin="5">Forget</Button>
                            </WrapPanel>
                        </Grid>
                    </StackPanel>
                </BlockUIContainer>
            </FlowDocument>
        </FlowDocumentScrollViewer>
    </StackPanel>
</Page>
